/PROG  PNS0025
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "SGH_1475_76_77*";
PROG_SIZE	= 3480;
CREATE		= DATE 23-07-04  TIME 12:40:22;
MODIFIED	= DATE 24-12-06  TIME 15:11:12;
FILE_NAME	= PNS0023;
VERSION		= 0;
LINE_COUNT	= 128;
MEMORY_SIZE	= 4040;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0015 ;
   7:  !  PART:LYRA3358/3366 ;
   8:  !ZYL15-7-16********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  DO[38]=OFF ;
  13:  R[14]=90    ;
  14:  R[18]=1    ;
  15:  R[19]=.1    ;
  16:  R[35]=TIMER[4]    ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[1] ;
  24:  CALL ARM_CHECK    ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC80    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  28:  PR[6]=PR[30]    ;
  29:  R[1]=0    ;
  30:  TIMER[1]=RESET ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  !PROCEED TO PICK ;
  36:  LBL[20] ;
  37:  IF DI[1]=ON AND DI[2]=ON,JMP LBL[40] ;
  38:  IF DI[29]=ON,JMP LBL[89] ;
  39:  JMP LBL[20] ;
  40:   ;
  41:  LBL[40:MEASURE HEIGHT?] ;
  42:  IF DI[2]=ON AND DI[4]=ON AND DI[44]=ON AND DI[46]=ON,JMP LBL[70] ;
  43:   ;
  44:  IF DI[2]=ON AND DI[4]=ON AND DI[44]=ON,JMP LBL[30] ;
  45:  IF DI[29]=ON,JMP LBL[89] ;
  46:  JMP LBL[40] ;
  47:   ;
  48:  LBL[70:MEASURE HEGHT ] ;
  49:  OVERRIDE=R[5] ;
  50:  DO[38]=OFF ;
  51:  PR[5]=PR[30]    ;
  52:  PR[5,3]=PR[30,3]-500    ;
  53:J P[15] 30% CNT20    ;
  54:L P[3:SAFE POUNCE] 500mm/sec CNT30    ;
  55:  SKIP CONDITION DI[9]=ON OR DI[11]=ON    ;
  56:  CALL PARTPICK    ;
  57:L PR[30] 50mm/sec CNT30    ;
  58:L PR[5] 35mm/sec CNT30 Skip,LBL[80],PR[6]=LPOS    ;
  59:  LBL[80] ;
  60:  DO[37]=PULSE,1.0sec ;
  61:  CALL PARTDROP    ;
  62:  DO[41]=PULSE,2.0sec ;
  63:   ;
  64:J P[3:SAFE POUNCE] 30% CNT30    ;
  65:  PAUSE ;
  66:  JMP LBL[50] ;
  67:   ;
  68:  LBL[30:GOTO DROP POUNCE] ;
  69:  DO[38]=OFF ;
  70:  OVERRIDE=R[5] ;
  71:J P[5] 80% CNT60    ;
  72:   ;
  73:  LBL[60] ;
  74:  IF DI[2]=ON AND DI[4]=ON AND DI[44]=ON,JMP LBL[50] ;
  75:  IF DI[29]=ON AND DI[38]=ON AND DI[45]=OFF,JMP LBL[90] ;
  76:  JMP LBL[60] ;
  77:   ;
  78:  LBL[50:MOVE TO PICK POS] ;
  79:  R[45]=PR[6,3]    ;
  80:J P[3:SAFE POUNCE] 30% CNT30    ;
  81:  DO[38]=ON ;
  82:  OVERRIDE=R[5] ;
  83:  IF R[45]<=(-1520),JMP LBL[98] ;
  84:  JMP LBL[99] ;
  85:  LBL[98] ;
  86:  DO[40]=PULSE,1.0sec ;
  87:  LBL[99] ;
  88:   ;
  89:L PR[6] 550mm/sec CNT0 DB  100.0mm,DO[37]=PULSE,1.5sec ACC100    ;
  90:   ;
  91:L PR[6] 550mm/sec CNT0 TB    .60sec,CALL PARTPICK ACC100    ;
  92:  CALL CHK_PICK    ;
  93:  WAIT    .40(sec) ;
  94:L P[3:SAFE POUNCE] 1000mm/sec CNT30    ;
  95:  WAIT DI[4]=ON AND DI[5]=ON AND DI[38]=ON AND DI[45]=OFF    ;
  96:  PR[6,3]=PR[6,3]-1.4    ;
  97:  DO[38]=OFF ;
  98:L P[5] 800mm/sec CNT30    ;
  99:J P[10] 30% CNT30    ;
 100:J P[11:DROP] 20% CNT5 TB R[19]sec,CALL PARTDROP_L BREAK    ;
 101:J P[12] 80% CNT70    ;
 102:J P[20] 80% CNT50    ;
 103:J P[21:DROP] 20% CNT5 TB R[19]sec,CALL PARTDROP_R BREAK    ;
 104:  CALL CHK_DROP    ;
 105:J P[22] 80% CNT70    ;
 106:   ;
 107:J P[5] 80% CNT50    ;
 108:J P[3:SAFE POUNCE] 50% CNT100    ;
 109:  DO[38]=ON ;
 110:  DO[6]=PULSE,1.0sec ;
 111:  IF DI[29]=ON AND DI[38]=ON AND DI[45]=OFF,JMP LBL[89] ;
 112:  IF DI[44]=ON,JMP LBL[60] ;
 113:  JMP LBL[86] ;
 114:  LBL[86] ;
 115:  DO[22]=PULSE,3.0sec ;
 116:  JMP LBL[89] ;
 117:  LBL[89] ;
 118:  IF DI[29]=ON AND DI[38]=ON AND DI[45]=OFF,JMP LBL[90] ;
 119:  JMP LBL[10] ;
 120:  LBL[90:END OF CYCLE] ;
 121:  TIMER[1]=STOP ;
 122:J P[5] 50% CNT70    ;
 123:J P[2:PICK POUNCE] 85% CNT100    ;
 124:J P[8:DROP POUNCE] 80% CNT100    ;
 125:  MOVE TO HOME    ;
 126:  DO[38]=OFF ;
 127:  R[38]=0    ;
 128:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2642.792  mm,	Y =   -74.795  mm,	Z =  -799.356  mm,
	W =  -179.940 deg,	P =     -.515 deg,	R =   -89.411 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2642.841  mm,	Y =  -552.770  mm,	Z =  -799.297  mm,
	W =  -179.940 deg,	P =     -.515 deg,	R =   -89.409 deg
};
P[3:"SAFE POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2642.989  mm,	Y = -2040.434  mm,	Z = -1151.421  mm,
	W =  -179.946 deg,	P =     -.512 deg,	R =   -88.939 deg
};
P[5]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2643.127  mm,	Y = -2040.305  mm,	Z =  -871.446  mm,
	W =  -179.935 deg,	P =     -.516 deg,	R =   -89.400 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2808.447  mm,	Y =  -390.819  mm,	Z =  -810.731  mm,
	W =   179.917 deg,	P =      .059 deg,	R =   -90.026 deg
};
P[10]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2978.460  mm,	Y = -2040.255  mm,	Z =  -871.716  mm,
	W =  -179.941 deg,	P =     -.512 deg,	R =   -89.401 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2978.165  mm,	Y = -2040.308  mm,	Z =  -870.426  mm,
	W =  -179.951 deg,	P =     -.507 deg,	R =   -89.405 deg
};
P[12]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2978.273  mm,	Y = -2040.395  mm,	Z =  -857.983  mm,
	W =  -179.948 deg,	P =     -.510 deg,	R =   -89.403 deg
};
P[15]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2642.849  mm,	Y = -2040.383  mm,	Z =  -899.735  mm,
	W =  -179.941 deg,	P =     -.513 deg,	R =   -88.648 deg
};
P[20]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2291.873  mm,	Y = -2129.105  mm,	Z =  -871.056  mm,
	W =  -179.940 deg,	P =     -.513 deg,	R =   -89.402 deg
};
P[21:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2316.019  mm,	Y = -2129.056  mm,	Z =  -875.600  mm,
	W =  -179.943 deg,	P =     -.510 deg,	R =   -89.403 deg
};
P[22]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2291.726  mm,	Y = -2128.782  mm,	Z =  -857.188  mm,
	W =  -179.950 deg,	P =     -.507 deg,	R =   -89.402 deg
};
/END
